package com.uva.dbcs.gestionDeUsuarios.dominio;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the CARNETCLIENTE database table.
 * 
 */
@Entity
@Table(name="CARNETCLIENTE")
@NamedQuery(name="Carnetcliente.findAll", query="SELECT c FROM Carnetcliente c")
public class Carnetcliente implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private CarnetclientePK id;

	@Temporal(TemporalType.DATE)
	private Date fechaRenovacion;

	//bi-directional many-to-one association to Carnet
	@ManyToOne(cascade={CascadeType.ALL})
	@JoinColumn(name="idCarnet")
	private Carnet carnet;

	//bi-directional many-to-one association to Cliente
	@ManyToOne
	@JoinColumn(name="idCliente")
	private Cliente cliente;

	public Carnetcliente() {
	}

	public CarnetclientePK getId() {
		return this.id;
	}

	public void setId(CarnetclientePK id) {
		this.id = id;
	}

	public Date getFechaRenovacion() {
		return this.fechaRenovacion;
	}

	public void setFechaRenovacion(Date fechaRenovacion) {
		this.fechaRenovacion = fechaRenovacion;
	}

	public Carnet getCarnet() {
		return this.carnet;
	}

	public void setCarnet(Carnet carnet) {
		this.carnet = carnet;
	}

	public Cliente getCliente() {
		return this.cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

}